fix(kingbase): escape SQL identifiers and literals in metadata/DDL paths (#1914) - #2197
Merged
Merged
Conversation
… per maintainer review (OtterMind#1914) - strengthen KingBaseSQLIdentifierProcessor (SPI ISQLIdentifierProcessor): quoteIdentifier always double-quotes with embedded-quote doubling, escapeString doubles single quotes; INSTANCE for call sites without MetaData access - KingBaseMetaData returns the processor from getSQLIdentifierProcessor(); metadata call sites use it (KINGBASE_SQL_IDENTIFIER_PROCESSOR removed) - DBManager/builder/enums use KingBaseSQLIdentifierProcessor.INSTANCE - non-escapable validation moved to KingBaseSqlGuards (safe expressions, index methods) - KingBaseSqlEscapes removed; tests migrated (15 green)
…uote for DDL paths (OtterMind#1914)
openai0229
force-pushed
the
fix/sqli2-kingbase
branch
from
July 29, 2026 09:49
df0a2e2 to
06ef3c2
Compare
openai0229
approved these changes
Jul 29, 2026
openai0229
left a comment
Contributor
There was a problem hiding this comment.
Maintainer review complete. KingBase identifier/literal escaping, PostgreSQL-derived guards, inherited builder paths, and regression coverage were revised and revalidated on the latest main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #1914
Summary
Completes the KingBase database-plugin portion of the identifier and literal escaping work.
Affected surfaces
Verification
mvn -B -f chat2db-community-server/pom.xml -pl chat2db-community-plugins/chat2db-community-kingbase -am clean test -DskipTests=false -Dmaven.test.skip=false -Dsurefire.failIfNoSpecifiedTests=falseBUILD SUCCESSacross 9 reactor modules; 184 tests passed in tested modules, including KingBase19/19, PostgreSQL49/49, SPI90/90, and tools26/26.git diff --check origin/main...HEAD: passed.Risk and compatibility
ISQLIdentifierProcessorcontract.Reviewer map
KingBaseSQLIdentifierProcessor,KingBaseSqlGuards, thenKingBaseSqlBuilder,KingBaseMetaData, andKingBaseDBManager.Contributor declaration
AI assistance: Substantial AI-assisted maintainer revision, multi-agent review, and test expansion; all final changes were source-reviewed and verified with the commands above.